package com.dit.action.customer;

import org.springframework.beans.factory.annotation.Autowired;

import com.dit.action.AbstractAction;
import com.dit.entity.Sme;
import com.dit.service.SmeService;

public class AddSmeAction extends AbstractAction {
	
	@Autowired
	private SmeService smeService;
	
	private Sme sme;
	
	public String viewAddSmePage() {
		return SUCCESS;
	}
	
	
	
	public String saveSme(){
		
		int status = smeService.save(sme, getSessionUserVariable().getId());
		System.out.println(sme.getInsertDateTime());
		
		if(status>0){
			return SUCCESS;
		}
		else{
			return SUCCESS;
		}
		
		
	}



	public Sme getSme() {
		return sme;
	}



	public void setSme(Sme sme) {
		this.sme = sme;
	}
}
